<template>
  <div>
    <h2>目录</h2>
    <ul>
      <li v-for="(item, index) in list" :key="index"><a href="javascript:void(0)" @click="jump(item)">{{ item.title }}</a></li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list: [
        {title: 'WangEditor 使用案例', path: '/01'},
        {title: 'WangEditor 进阶', path: '/02'}
      ]
    }
  },
  methods: {
    // 跳转路由
    jump(item) {
      this.$router.push({path: item.path})
    }
  }
}
</script>